package com.chapter1.basic.queue;

import org.junit.Test;

/** 
 * @ClassName: TestQueue 
 * @Description: 队列测试工具
 * @author minjun minjun@bw30.com
 * @date 2015-2-25 下午10:42:36 
 *  
 */
public class TestQueue {

	@Test
	public void testQ(){
		Queue<String> q=new Queue<String>();
		q.offer("jack");
		q.offer("andy");
		q.offer("mike");
		System.out.println(q.size());
		System.out.println(q.poll()+","+q.size());
		System.out.println(q.poll()+","+q.size());
		System.out.println(q.poll()+","+q.size());
		System.out.println(q.poll()+","+q.size());
	}
	
	@Test
	public void test(){
//		Queue<String> q=new LinkedBlockingQueue<String>();
//		q.offer("jack");
//		q.offer("andy");
//		q.offer("mike");
//		
//		System.out.println(q.poll());
//		System.out.println(q.poll());
//		System.out.println(q.poll());
//		System.out.println(q.poll());
	}
}
